<template>
  <div style="margin-top: 90px" class="contanier">
    <h1>登录组件</h1>
    <button @click="login">登录</button>
  </div>
</template>

<script>
export default {
  name: "Vue2demoLogin",
  data() {
    return {};
  },
  methods: {
    login() {
      localStorage.setItem("token", "12344");
      console.log(this.$route.query);
      this.$router.push(this.$route.query.redirect);
    },
  },
};
</script>

<style lang="scss" scoped></style>
